# %%
import librosa
from spafe.utils import vis
from spafe.features.rplp import rplp, plp

# init input vars
num_ceps = 13

# read wav
sig, fs = librosa.load("../test.wav", sr=8000)

# compute features
plps = plp(sig, fs, num_ceps)
print(plps.shape)
rplps = rplp(sig, fs, num_ceps)
print(rplps.shape)

# visualize spectogram
vis.spectogram(sig, fs)
# visualize features
vis.visualize_features(plps, 'PLP Coefficient Index', 'Frame Index')
vis.visualize_features(rplps, 'RPLP Coefficient Index', 'Frame Index')
# %%
